//
//  Header.h
//  ethers
//
//  Created by yiren on 2018/6/26.
//  Copyright © 2018年 Ethers. All rights reserved.
//

#ifndef Header_h
#define Header_h
///
/* 解决适配问题 */
#define  kPercenY_scale(value)  ( [UIScreen mainScreen].bounds.size.height > [UIScreen mainScreen].bounds.size.width ? (value /(375.0f/[UIScreen mainScreen].bounds.size.width)):(value /(375.0f/[UIScreen mainScreen].bounds.size.height)))
#define  kPercenX_scale(value)   [UIScreen mainScreen].bounds.size.height > [UIScreen mainScreen].bounds.size.width ? (value /(375.0f/[UIScreen mainScreen].bounds.size.width)):(value /(375.0f/[UIScreen mainScreen].bounds.size.height))
#define isVertical [@([UIScreen mainScreen].bounds.size.height > [UIScreen mainScreen].bounds.size.width ?YES:NO) boolValue]
/////////////////////////////Notification//////////////////////////////////
#define kNotificationSettingWalletIP @"kNotificationSettingWalletIP"
//////---------------------------url----------------------//////
#define kRinkeby        @"https://rinkeby.infura.io/HZ7akc0jwna5cI2GpRW8"
#define kMainnet        @"https://rinkeby.infura.io/HZ7akc0jwna5cI2GpRW8"

////nsuserdefaults///
#define kUserArray      @"userarray"
#define kUserJson       @"userjson"
#define kUserAddress    @"useraddress"
#define kUserKey        @"userkey"
#define kUserName       @"username"
#define kUserPhrase     @"userphrase"
#define kUserPassword   @"userpassword"
#define kUserBalance    @"userbalance"

#define kUserurl        @"userurl"
#define kEthPrice       @"ethprice"
#define kUsdPrice       @"usdprice"
#define kCurrency       @"currency"

#define kCurrentAccount @"currentaccount"

#define kUserDefaultsSettingWalletIP @"kUserDefaultsSettingWalletIP"

//------------------------------ETH PRICE----------------///
#define kWei            @"1000000000000000000"
#define kGwei            @"1000000000"
//------------------------//
#define WS(ws) __weak __typeof(* &self)ws = self

//------------------------UI-------------------//
///
#define IS_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
//////////////////////////Util//////////////////////////////////////
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
#define appFrame            [[UIScreen mainScreen] applicationFrame]
#define appBounds           [[UIScreen mainScreen] bounds]
#define widthX              [UIScreen mainScreen].bounds.size.height > [UIScreen mainScreen].bounds.size.width ? ([UIScreen mainScreen].bounds.size.width/375.0) : ([UIScreen mainScreen].bounds.size.height/375.0)
#define heightX          [UIScreen mainScreen].bounds.size.height > [UIScreen mainScreen].bounds.size.width ? appBounds.size.height/667.0 : appBounds.size.width/667.0
#define heightRate          [@(heightX) doubleValue]
#define widthRate           [@(widthX) doubleValue]
#define kScreenScale        1/[UIScreen mainScreen].scale
/* 解决适配问题 */

////////////////////////////COLOR////////////////////////////////////////////
#define ka9c8d7 [UIColor colorWithHex:@"a9c8d7"];
#define k607d8b [UIColor colorWithHex:@"607d8b"];
#define k344650 [UIColor colorWithHex:@"344650"];
#define k8db2c3 [UIColor colorWithHex:@"8db2c3"];
#define kffea00 [UIColor colorWithHex:@"ffea00"];
#define ka1bfce [UIColor colorWithHex:@"a1bfce"];
#define k11a598 [UIColor colorWithHex:@"11a598"];
////

#endif /* Header_h */
